#include	"Simulator.h"

Simulator::Simulator()
{
	wm = new World();
	mShowInterface = new ShowInterface( wm );
}

Simulator::~Simulator()
{
	delete mShowInterface;
	delete wm;
}

void Simulator::InitialCell()
{
	CellSnake *cb1 = new CellSnake( wm );
	Cell *cb2 = new Cell( wm );
	//CellCube *cb3 = new CellCube( wm );
	//CellFly *cb4 = new CellFly( wm );
	//CellFrame *cb5 = new CellFrame( wm );

	//delete cb1;
	//delete cb2;
	//delete cb3;
	//delete cb4;
	//delete cb5;
}

void Simulator::Simulate( int simCycle )
{
	InitialCell();

	for( int i = 0; i < simCycle; i ++ )
	{
		wm->Update();
		mShowInterface->ShowResult( i );	
	}	
}
